package com.communal.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * 
 * @author Created by andrey.kuznetsov <br>
 * @author Last modified by $Author$ <br>
 * @author Last modified on $Date$ at revision $Revision$ <br>
 */
@MappedSuperclass
public class ModelEntity extends BaseEntity implements Serializable{
	
	private static final long serialVersionUID = 4338417218726110072L;
	
	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "model_id")
	protected Model model;

	public void setModel(Model p_model) {
		model = p_model;
	}
	
	public Model getModel() {
		return model;
	}
	
}
